Jump to content
Xtreme .Net Talk

dynamic_sysop

Leaders
  • Posts

    1044
  • Joined

  • Last visited

Everything posted by dynamic_sysop

  1. you need to specify the full name of your application in GetManifestResourceStream eg: [color=#0000ff]Dim[/color] s [color=#0000ff]As[/color] System.IO.Stream = [Assembly].GetExecutingAssembly().GetManifestResourceStream(Application.ProductName & ".EmbeddedResources.logo.jpg") also you should be using Image.FromStream to create imgLogo eg: imgLogo.Image = [color=black][color=#0000ff][color=black]Image.FromStream(s)[/color][/color] [/color]
  2. why are you first declaring pagefrmHistory as frmHistory .... then when making the new instance of it, declaing it as Form2? ... shouldn't pagefrmHistory = new frmHistory(); ? you need to follow PlausiblyDamp's advice of checking if it's null the way to do this is with a Boolean value, which you would set when changing the properties ( created / visible ) of the form
  3. WB Pentium Guy :)
  4. use Activator.CreateInstance( " yourType here " )
  5. use System.Text.RegularExpressions.Regex ie: [Csharp] string s = "test with = & the & sign = no good, we must remove the = & the & :)"; System.Text.RegularExpressions.Regex rgx = new System.Text.RegularExpressions.Regex("([&])|([=])"); s = rgx.Replace(s," "); Console.WriteLine(s); [/csharp]
  6. using the following ... .fFlags = FOF_ALLOWUNDO Or FOF_NOCONFIRMATION sends files silently to the recycle bin for me :) .
  7. if you look on msdn at the way api's are made up, you may get a better insight [in] would be a pointer , string , int32 etc.. you are injecting in to the api call [Out] would be a pointer etc... that you are receiving [in] [Out] would work as both eg: take a look at the FindWindow Api ( for C++ ) on msdn, the description of the Parameters specifies you are injecting a value in to the call. where as, the GetWindowText api holds an [Out] value, where it receives a string...
  8. no probs, i can also make progressbars smooth in .NET / C# ;)
  9. made a quick example for you incase you aint resolved this. you need to set the PBM_SETBKCOLOR & PBM_SETBKCOLOR on your bar via sendmessage, the percentage is a simple division :) Private Declare Function SendMessage Lib "user32.dll" Alias "SendMessageA" (ByVal hwnd As Int32, ByVal wMsg As Int32, ByVal wParam As Int32, ByVal lParam As Int32) As Int32 Private Const WM_USER As Int32 = &H400 Private Const CCM_FIRST As Int32 = &H2000 Private Const CCM_SETBKCOLOR As Int32 = (CCM_FIRST + 1) Private Const PBM_SETBARCOLOR As Int32 = (WM_USER + 9) Private Const PBM_SETBKCOLOR As Int32 = CCM_SETBKCOLOR Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load '/// progressbar colour ( the value part ) SendMessage(ProgressBar1.Handle.ToInt32, PBM_SETBARCOLOR, 0, ColorTranslator.ToWin32(Color.LightGreen)) '/// now the back colour of the bar SendMessage(ProgressBar1.Handle.ToInt32, PBM_SETBKCOLOR, 0, ColorTranslator.ToWin32(Color.White)) End Sub Private Function BarPercentage(ByVal bar As ProgressBar) As Int32 Return ((ProgressBar1.Value / ProgressBar1.Maximum) * 100) End Function Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim pThread As New Threading.Thread(AddressOf progThread) pThread.Start() End Sub Private Sub progThread() ProgressBar1.Step = 1 For i As Int32 = ProgressBar1.Minimum To ProgressBar1.Maximum ProgressBar1.PerformStep() MyBase.Text = BarPercentage(ProgressBar1) & "% complete" System.Threading.Thread.Sleep(1) Next End Sub hope it helps.
  10. just do it inside the constructor of the form, like the highlighted ( BOLD ) part below ... #Region " Windows Form Designer generated code " Public Sub New() MyBase.New() 'This call is required by the Windows Form Designer. InitializeComponent() 'Add any initialization after the InitializeComponent() call End Sub 'Form overrides dispose to clean up the component list. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub 'Required by the Windows Form Designer Private components As System.ComponentModel.IContainer 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. Friend WithEvents Button1 As System.Windows.Forms.Button <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Me.Button1 = New System.Windows.Forms.Button Me.SuspendLayout() ' 'Button1 ' Me.Button1.Location = New System.Drawing.Point(16, 16) Me.Button1.Name = "Button1" Me.Button1.TabIndex = 0 Me.Button1.Text = "Button1" [b] '/// like this ... Dim btnimg As Image = Image.FromStream(Reflection.Assembly.GetExecutingAssembly.GetManifestResourceStream(Application.ProductName & ".Picture1.jpg"))[/b] [b] '/// SET IMAGE ON BUTTON ....[/b][b] Me.Button1.Image = btnimg[/b] ' 'Form1 ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.ClientSize = New System.Drawing.Size(432, 230) Me.Controls.Add(Me.Button1) Me.Name = "Form1" Me.Text = "Form1" Me.ResumeLayout(False) End Sub #End Region [size=2] [/size]
  11. you need to specify a device id not a ' 0 ' , eg: [csharp] [DllImport("winmm.dll", SetLastError=true, CallingConvention=CallingConvention.Winapi)] public static extern int waveOutSetVolume(int uDeviceID, int dwVolume); [DllImport("winmm.dll", SetLastError=true, CallingConvention=CallingConvention.Winapi)] public static extern int waveOutGetVolume(int uDeviceID); private void button1_Click(object sender, System.EventArgs e) { waveOutSetVolume( AppDomain.GetCurrentThreadId(), 0xFFFF ); Console.WriteLine( waveOutGetVolume( AppDomain.GetCurrentThreadId() ) ); }[/csharp]
  12. try the PARAFORMAT2 Structure the bits you want for your spacing are ... dySpaceBefore Size of the spacing above the paragraph, in twips. To use this member, set the PFM_SPACEBEFORE flag in the dwMask member. The value must be greater than or equal to zero. dySpaceAfter Specifies the size of the spacing below the paragraph, in twips. To use this member, set the PFM_SPACEAFTER flag in the dwMask member. The value must be greater than or equal to zero. dyLineSpacing Spacing between lines. For a description of how this value is interpreted, see the bLineSpacingRule member. To use this member, set the PFM_LINESPACING flag in the dwMask member. my translation ( which you can find in a previous post from a couple of weeks ago if you do a forum search for post with my name ) of the structure is ... <StructLayout(LayoutKind.Sequential)> _ Public Structure PARAFORMAT2 Public cbSize As Int32 Public dwMask As Int32 Public wNumbering As Int16 Public wReserved As Int16 Public dxStartIndent As IntPtr Public dxRightIndent As IntPtr Public dxOffset As IntPtr Public wAlignment As Int16 Public cTabCount AsShort <MarshalAs(UnmanagedType.ByValArray, SizeConst:=32)> _ Public rgxTabs() As IntPtr Public dySpaceBefore As IntPtr Public dySpaceAfter As IntPtr Public dyLineSpacing As IntPtr Public sStyle AsShort Public bLineSpacingRule AsByte Public bOutlineLevel AsByte Public wShadingWeight As Int16 Public wShadingStyle As Int16 Public wNumberingStart As Int16 Public wNumberingStyle As Int16 Public wNumberingTab As Int16 Public wBorderSpace As Int16 Public wBorderWidth As Int16 Public wBorders As Int16 End Structure you can also align your paragraphs etc... with this struct.
  13. you need to specify *.* as the Filter property, then check the DialogResult on ShowDialog eg: [size=2][color=#0000ff]Dim[/color][/size][size=2] OpenFileDialog1 [/size][size=2][color=#0000ff]As [/color][/size][size=2][color=#0000ff]New[/color][/size][size=2] OpenFileDialog[/size] [size=2] OpenFileDialog1.Filter = "All Files|*.*" [/size][size=2][color=#0000ff]If[/color][/size][size=2] OpenFileDialog1.ShowDialog = DialogResult.OK [/size][size=2][color=#0000ff]Then[/color][/size] [size=2][color=#0000ff] [/color][/size][size=2] Process.Start(OpenFileDialog1.FileName) [/size][size=2][color=#0000ff]End [/color][/size][size=2][color=#0000ff]If[/color][/size]
  14. you can use the IDictionaryEnumerator to itinerate through each entry, eg: [size=2][color=#0000ff]Dim[/color][/size][size=2] arrVariables [/size][size=2][color=#0000ff]As[/color][/size][size=2] IDictionary = Environment.GetEnvironmentVariables()[/size] [size=2] [/size][size=2][color=#0000ff]Dim[/color][/size][size=2] arrEnumerator [/size][size=2][color=#0000ff]As[/color][/size][size=2] IDictionaryEnumerator = arrVariables.GetEnumerator[/size] [size=2] [/size][size=2][color=#0000ff]While[/color][/size][size=2] arrEnumerator.MoveNext [/size] [size=2] [/size][size=2][color=#008000] '/// Key ( eg: LOGONSERVER ) , Value ( eg: \\DEN-HOME ) ...[/color][/size] [size=2][color=black][/color][/size] [size=2][color=black] Console.WriteLine(arrEnumerator.Entry.Key & " : " & arrEnumerator.Entry.Value)[/color] [/size][size=2][color=#0000ff]End [/color][/size][size=2][color=#0000ff]While[/color][/size] [size=2][color=#0000ff] [/color][/size]
  15. don't know about crappy links :rolleyes: the 2nd link in the list on that google search happens to be one of the best VB code sites on the net, nearly all of it may be pre - .NET, but just about all of that can be modded to work in .NET this section of code .... gives you a perfect insight into which key to create / set the shell\open\command section of RegKey is the part that you need to set the Default item of, using as Diesel said the Microsoft.Win32.Registry class. BTW: Diesel , you seem to be mixing and matching your VB & C# in that code ;) by the look of those ; ; ;
  16. sure http://www.xtremedotnettalk.com/x_images/images/smilies/smile.gif [structLayout(LayoutKind.Sequential)] public struct PARAFORMAT2 { public Int32 cbSize; public Int32 dwMask; public Int16 wNumbering; public Int16 wReserved; public IntPtr dxStartIndent; public IntPtr dxRightIndent; public IntPtr dxOffset; public Int16 wAlignment; public short cTabCount; [MarshalAs(UnmanagedType.ByValArray, SizeConst =32)] public IntPtr[] rgxTabs; public IntPtr dySpaceBefore; public IntPtr dySpaceAfter; public IntPtr dyLineSpacing; public short sStyle; public byte bLineSpacingRule; public byte bOutlineLevel; public Int16 wShadingWeight; public Int16 wShadingStyle; public Int16 wNumberingStart; public Int16 wNumberingStyle; public Int16 wNumberingTab; public Int16 wBorderSpace; public Int16 wBorderWidth; public Int16 wBorders; } [DllImport("user32", CharSet = CharSet.Auto)] private static extern Int32 SendMessage(HandleRef hwnd , Int32 msg , Int32 wparam , ref PARAFORMAT2 lParam); private const int EM_GETPARAFORMAT = 1085; private const int EM_SETPARAFORMAT = 1095; private const int PFM_NUMBERING = 0x20; private const int BULLET_NUMBER = 2 ; private void button1_Click(object sender, System.EventArgs e) { PARAFORMAT2 param = new PARAFORMAT2(); param.cbSize = Marshal.SizeOf(typeof(PARAFORMAT2)); SendMessage(new HandleRef(richTextBox1, richTextBox1.Handle), EM_GETPARAFORMAT, 0,ref param); param.dwMask = PFM_NUMBERING; param.wNumbering = BULLET_NUMBER; SendMessage(new HandleRef(richTextBox1, richTextBox1.Handle), EM_SETPARAFORMAT, 0,ref param); }
  17. i decided to knock an example together for you, i already have an indepth C# richtext api, so i've quite literally translated the PARAFORMAT2 structure over. [size=2] <StructLayout(LayoutKind.Sequential)> _ [size=2][color=#0000ff]Public [/color][/size][size=2][color=#0000ff]Structure[/color][/size][size=2] PARAFORMAT2 [/size][size=2][color=#0000ff] Public[/color][/size][size=2] cbSize [/size][size=2][color=#0000ff]As[/color][/size][size=2] Int32 [/size][size=2][color=#0000ff] Public[/color][/size][size=2] dwMask [/size][size=2][color=#0000ff]As[/color][/size][size=2] Int32[/size] [size=2][color=#0000ff] Public[/color][/size][size=2] wNumbering [/size][size=2][color=#0000ff]As[/color][/size][size=2] Int16 [/size][size=2][color=#0000ff] Public[/color][/size][size=2] wReserved [/size][size=2][color=#0000ff]As[/color][/size][size=2] Int16 [/size][size=2][color=#0000ff] Public[/color][/size][size=2] dxStartIndent [/size][size=2][color=#0000ff]As[/color][/size][size=2] IntPtr [/size][size=2][color=#0000ff] Public[/color][/size][size=2] dxRightIndent [/size][size=2][color=#0000ff]As[/color][/size][size=2] IntPtr [/size][size=2][color=#0000ff] Public[/color][/size][size=2] dxOffset [/size][size=2][color=#0000ff]As[/color][/size][size=2] IntPtr [/size][size=2][color=#0000ff] Public[/color][/size][size=2] wAlignment [/size][size=2][color=#0000ff]As[/color][/size][size=2] Int16 [/size][size=2][color=#0000ff] Public[/color][/size][size=2] cTabCount [/size][size=2][color=#0000ff]As[/color][/size][size=2][color=#0000ff]Short [/color][/size][size=2] <MarshalAs(UnmanagedType.ByValArray, SizeConst:=32)> _ [/size][size=2][color=#0000ff] Public[/color][/size][size=2] rgxTabs() [/size][size=2][color=#0000ff]As[/color][/size][size=2] IntPtr [/size][size=2][color=#0000ff] Public[/color][/size][size=2] dySpaceBefore [/size][size=2][color=#0000ff]As[/color][/size][size=2] IntPtr [/size][size=2][color=#0000ff] Public[/color][/size][size=2] dySpaceAfter [/size][size=2][color=#0000ff]As[/color][/size][size=2] IntPtr [/size][size=2][color=#0000ff] Public[/color][/size][size=2] dyLineSpacing [/size][size=2][color=#0000ff]As[/color][/size][size=2] IntPtr [/size][size=2][color=#0000ff] Public[/color][/size][size=2] sStyle [/size][size=2][color=#0000ff]As[/color][/size][size=2][color=#0000ff]Short [/color][/size][size=2][color=#0000ff] Public[/color][/size][size=2] bLineSpacingRule [/size][size=2][color=#0000ff]As[/color][/size][size=2][color=#0000ff]Byte [/color][/size][size=2][color=#0000ff] Public[/color][/size][size=2] bOutlineLevel [/size][size=2][color=#0000ff]As[/color][/size][size=2][color=#0000ff]Byte [/color][/size][size=2][color=#0000ff] Public[/color][/size][size=2] wShadingWeight [/size][size=2][color=#0000ff]As[/color][/size][size=2] Int16 [/size][size=2][color=#0000ff] Public[/color][/size][size=2] wShadingStyle [/size][size=2][color=#0000ff]As[/color][/size][size=2] Int16 [/size][size=2][color=#0000ff] Public[/color][/size][size=2] wNumberingStart [/size][size=2][color=#0000ff]As[/color][/size][size=2] Int16 [/size][size=2][color=#0000ff] Public[/color][/size][size=2] wNumberingStyle [/size][size=2][color=#0000ff]As[/color][/size][size=2] Int16 [/size][size=2][color=#0000ff] Public[/color][/size][size=2] wNumberingTab [/size][size=2][color=#0000ff]As[/color][/size][size=2] Int16 [/size][size=2][color=#0000ff] Public[/color][/size][size=2] wBorderSpace [/size][size=2][color=#0000ff]As[/color][/size][size=2] Int16 [/size][size=2][color=#0000ff] Public[/color][/size][size=2] wBorderWidth [/size][size=2][color=#0000ff]As[/color][/size][size=2] Int16 [/size][size=2][color=#0000ff] Public[/color][/size][size=2] wBorders [/size][size=2][color=#0000ff]As[/color][/size][size=2] Int16 [/size][size=2][color=#0000ff]End [/color][/size][size=2][color=#0000ff]Structure[/color][/size] [size=2][color=#0000ff] [/color][/size][size=2]<DllImport("user32", CharSet:=CharSet.Auto)> _ [/size][size=2][color=#0000ff]Private [/color][/size][size=2][color=#0000ff]Shared [/color][/size][size=2][color=#0000ff]Function[/color][/size][size=2] SendMessage( _ [/size][size=2][color=#0000ff] ByVal[/color][/size][size=2] hWnd [/size][size=2][color=#0000ff]As[/color][/size][size=2] HandleRef, _ [/size][size=2][color=#0000ff] ByVal[/color][/size][size=2] msg [/size][size=2][color=#0000ff]As[/color][/size][size=2] Int32, _ [/size][size=2][color=#0000ff] ByVal[/color][/size][size=2] wParam [/size][size=2][color=#0000ff]As[/color][/size][size=2] Int32, _ [/size][size=2][color=#0000ff] ByVal[/color][/size][size=2] lParam [/size][size=2][color=#0000ff]As[/color][/size][size=2] Int32) [/size][size=2][color=#0000ff]As[/color][/size][size=2] Int32 [/size][size=2][color=#0000ff]End [/color][/size][size=2][color=#0000ff]Function [/color][/size][size=2]<DllImport("user32", CharSet:=CharSet.Auto)> _ [/size][size=2][color=#0000ff]Private [/color][/size][size=2][color=#0000ff]Shared [/color][/size][size=2][color=#0000ff]Function[/color][/size][size=2] SendMessage( _ [/size][size=2][color=#0000ff] ByVal[/color][/size][size=2] hWnd [/size][size=2][color=#0000ff]As[/color][/size][size=2] HandleRef, _ [/size][size=2][color=#0000ff] ByVal[/color][/size][size=2] msg [/size][size=2][color=#0000ff]As[/color][/size][size=2] Int32, _ [/size][size=2][color=#0000ff] ByVal[/color][/size][size=2] wParam [/size][size=2][color=#0000ff]As[/color][/size][size=2] Int32, _ [/size][size=2][color=#0000ff] ByRef[/color][/size][size=2] lParam [/size][size=2][color=#0000ff]As[/color][/size][size=2] PARAFORMAT2) [/size][size=2][color=#0000ff]As[/color][/size][size=2] Int32 [/size][size=2][color=#0000ff]End [/color][/size][size=2][color=#0000ff]Function [/color][/size][size=2][color=#0000ff]Private [/color][/size][size=2][color=#0000ff]Const[/color][/size][size=2] EM_GETPARAFORMAT = 1085 [/size][size=2][color=#0000ff]Private [/color][/size][size=2][color=#0000ff]Const[/color][/size][size=2] EM_SETPARAFORMAT = 1095 [/size][size=2][color=#0000ff]Private [/color][/size][size=2][color=#0000ff]Const[/color][/size][size=2] PFM_NUMBERING [/size][size=2][color=#0000ff]As[/color][/size][size=2] Int32 = &H20 [/size][size=2][color=#0000ff]Private [/color][/size][size=2][color=#0000ff]Const[/color][/size][size=2] BULLET_NUMBER = 2[/size] [size=2] [/size] [size=2] [/size][size=2][color=#0000ff]Private [/color][/size][size=2][color=#0000ff]Sub[/color][/size][size=2] Button1_Click([/size][size=2][color=#0000ff]ByVal[/color][/size][size=2] sender [/size][size=2][color=#0000ff]As[/color][/size][size=2] System.Object, [/size][size=2][color=#0000ff]ByVal[/color][/size][size=2] e [/size][size=2][color=#0000ff]As[/color][/size][size=2] System.EventArgs) [/size][size=2][color=#0000ff]Handles[/color][/size][size=2] Button1.Click[/size] [size=2] [/size][size=2][color=#0000ff] Dim[/color][/size][size=2] param [/size][size=2][color=#0000ff]As[/color][/size][size=2][color=#0000ff]New[/color][/size][size=2] PARAFORMAT2[/size] [size=2] [/size][size=2][color=#008000] '/// you must specify the size of the structure here, using Marshal.SizeOf , in VB6 it was Len( )[/color][/size] [size=2][color=#008000] [/color][/size][size=2] [color=black]param.cbSize = Marshal.SizeOf(param)[/color][/size] [size=2] [/size][size=2][color=#008000] '/// build up the param structure with the current layout...[/color][/size] [size=2][color=#008000] [/color][/size][size=2] [color=black]SendMessage([/color][/size][size=2][color=#0000ff]New[/color][/size][size=2] [color=black]HandleRef(rtb, rtb.Handle), EM_GETPARAFORMAT, 0, param)[/color][/size] [size=2] [/size][size=2][color=#008000] '/// wNumbering[/color][/size] [size=2][color=#008000] [/color][/size][size=2][color=#008000] '/// Options used for bulleted or numbered paragraphs. To use this member, set the PFM_NUMBERING flag in the dwMask member.[/color][/size] [size=2][color=#008000] [/color][/size][size=2][color=#008000] '/// PFN_BULLET ( 1 ) = Insert a bullet at the beginning of each selected paragraph[/color][/size] [size=2][color=#008000] [/color][/size][size=2][color=#008000] '/// 2 = Uses Arabic numbers (1, 2, 3, ...). , hence BULLET_NUMBER.[/color][/size] [size=2][color=#008000] [/color][/size][size=2] [color=black]param.dwMask = PFM_NUMBERING[/color] [color=black]param.wNumbering = BULLET_NUMBER[/color] [/size][size=2][color=#008000] '/// update the richtextbox... [/color][/size][size=2] [/size] [size=2] [color=black]SendMessage([/color][/size][size=2][color=#0000ff]New[/color][/size][size=2] [color=black]HandleRef(rtb, rtb.Handle), EM_SETPARAFORMAT, 0, param)[/color][/size] [size=2] [/size][size=2][color=#0000ff]End [/color][/size][size=2][color=#0000ff]Sub[/color][/size] [/size][size=2][color=#0000ff] [/color][/size]
  18. the PARAFORMAT2 Structure is what you want to be searching for. the specific area being ... wNumbering Options used for bulleted or numbered paragraphs. To use this member, set the PFM_NUMBERING flag in the dwMask member. This member can be one of the following values. zero No paragraph numbering or bullets. PFN_BULLET Insert a bullet at the beginning of each selected paragraph.Rich Edit versions earlier than version 3.0 do not display paragraph numbers. However, for compatibility with Microsoft Text Object Model (TOM) interfaces, wNumbering can specify one of the following values. (The rich edit control stores the value but does not use it to display the text.) 2 Uses Arabic numbers (1, 2, 3, ...). 3 Uses lowercase letters (a, b, c, ...). 4 Uses uppercase letters (A, B, C, ...). 5 Uses lowercase Roman numerals (i, ii, iii, ...). 6 Uses uppercase Roman numerals (I, II, III, ...). 7 Uses a sequence of characters beginning with the Unicode character specified by the wNumberingStart member. to get the current paraformat you need to call EM_GETPARAFORMAT Message to set the paramformat ( with any changes you have added ) EM_SETPARAFORMAT Message
  19. set the MdiParent property of your ' other ' Forms. eg: '/// assuming you have set this form as IsMdiContainer = True '/// to make other Forms ChildForms Private frmChild As Form2 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load frmChild = New Form2 frmChild.MdiParent = Me frmChild.Show() End Sub
  20. what do you want to do to the mdi container? it's a bit vague just wondering how to work with it ;) do you want to add something to it, colour it, or something else? the container part is called an MdiClient if that helps, you can find it by looping through the mdi form's controls.
  21. if you want a 5 or 10 min thing, why not run the add-in on windows startup via the appropriate registry key? eg: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run add your application in the list there, as you probably already know, you can specify if it's hidden etc... / how to start it.
  22. here's a quick example of modifying a public control on a form via a seperate thread, you need to make a cast of the ActiveForm. eg: private void button1_Click(object sender, System.EventArgs e) { System.Threading.Thread thread = new System.Threading.Thread(new System.Threading.ThreadStart(myThread)); thread.Start(); } static void myThread() { /// cast a Form1 , by getting the ActiveForm... Form1 frm1 = ( Form1 )Form.ActiveForm; frm1.label1.Text = "some fandaby dozy text here"; MessageBox.Show("your label should now say...\r" + frm1.label1.Text); }
  23. here's a link to a VB6 example >>link<< , you basically need to hook the dialog so that you can access it's listview & set it's style. it shouldn't be to hard to transform to .NET :)
  24. well the creating a HTML file from a word file can be found on this code example i posted some time ago >> EXAMPLE << :) it's in the codebank about 3 quaters of the way down the page.
  25. probably because the code in my form originally had more than 1 line inside the With / End With statement :rolleyes: i did have various other options set like MultiSelect etc... but thought it easier to remove them and just leave the Filter ( incase you didn't understand the Filter property ) however , a point i'd love to state back. you are quick enough at asking for help, but the appreciation for help seems to have vanished :confused: maybe some of us are bought up to say thanks when helped by someone else & others are very quick at asking but never can be bothered to actually appreciate it :) before trying to slate someone else ( who was only trying to help you in his own free time / time he could have spent helping someone who actually respected the help ) try thinking about your own little un polite ways :D
×
×
  • Create New...