Jump to content
Xtreme .Net Talk

pckm_123

Members
  • Posts

    7
  • Joined

  • Last visited

Everything posted by pckm_123

  1. no.. I've should clearify about my class before here what I want to do. I have Form1 and Class myClass instead of having and calling myClass methods like myClass.DisplayMessage() myClass.DoFirst() myClass.DisplayMessage() myClass.DoSecond() myClass.DisplayMessage() myClass.DoThird() I want to call myClass.DoSomething() from Form1. Let's say DoSomething() have to display messages on the Form1 several times within scope of its method. what i want DoSomething() to do is display the message on the form, like "about to do....1". then.. do whatever have to and display another message on the Form again like "about to do ..2" because doing second is depending on first one... and the third one to do is depending on second one.. So if I take your advised, I have to devide everthing into pieaces which will be really painful for me.. If I know the way to display the message to the Form from myClass that would be really really useful. Thank you
  2. I have a form, and one class on the form, there is text field to display the messages Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim a As myClass a.DisplayMessage End Sub in the class Public Class myClass Sub DisplayMessage() form.msg = "hello.. this is message from myClass" End Sub End Class how can I display message on the form from the class function
  3. I have program written in VB.Net. the program is form based I'm calling myvbnet.exe from the other program, let's say another c++ program. I have following code in myvbnet.exe Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim arg1 As String = ReadCommandLine() End Sub Function ReadCommandLine() Dim arg1 As String arg1 = Environment.CommandLine ReadCommandLine = arg1 End Function I used ShellExecuteEx to call myvbnet.exe and pass the argument but I got the following very long error message the application attempted to perform an operation not allowed by the security policy. The operation required the SecurityException . To grant this application the required permission please contact your system administrator, or use the Midrosoft.NET security policy administration tool. See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box. ************** Exception Text ************** System.Security.SecurityException: Request for the permission of type System.Security.Permissions.EnvironmentPermission, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed. at System.Security.CodeAccessSecurityEngine.CheckHelper(PermissionSet grantedSet, PermissionSet deniedSet, CodeAccessPermission demand, PermissionToken permToken) at System.Security.CodeAccessSecurityEngine.Check (PermissionToken permToken, CodeAccessPermission demand, StackCrawlMark& stackMark, Int32 checkFrames, Int32 unrestrictedOverride) at System.Security.CodeAccessSecurityEngine.Check(CodeAccessPermission cap, StackCrawlMark& stackMark) at System.Security.CodeAccessPermission.Demand() at Microsoft.VisualBasic.Interaction.Command() at PrintMSOF.Form1.GetFileType(String& tempStr) at PrintMSOF.Form1.Form1_Load(Object sender, EventArgs e) at System.Windows.Forms.Form.OnLoad(EventArgs e) at System.Windows.Forms.Form.OnCreateControl() at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible) at System.Windows.Forms.Control.CreateControl() I got the same message even after taking the line arg1=Enviroment.CommandLine How can I call VB.Net Program with arguments from my C++ program?
  4. I have the functions to read properties of the files. Like no matter what the file extension (.doc, .xls, .tiff,.giff, .pdf.etc.) is it tells what type of the file is, such as Microsft Word, Microsoft Excel, Powerpoint, Adobe Acrobat, Jpeg file, and so on. but it only works for excel and word I found those the functions on microsoft.com http://msdn.microsoft.com/library/default.asp?url=/library/en-us/stg/stg/enumall_sample.asp and the other link is http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnolegen/html/msdn_propset.asp how can i tell this given file name ( with path) is Adobe Acrobat file, or Jpeg file, or Tiff file or Word file, or Access file etc? thank you thank you
  5. thank you I decided to create dll with c++ since I dont' know much about creating dll with VB
  6. ok.. so what kind i could create? after it get created, i can call from any language? such as call its functions from both c++ and vb?
  7. can i create dll in vb.net?? I know i can in c++ and cannot in vb 6.0. the reason i'm asking is because i have program written in vb and i have to convert it back to c++ when i want to create dll and lib for that program.
×
×
  • Create New...