|
Well for changing values you can select the variable which you need to change the value during testing and press Ctrl + ALT + Q
now here nto only you can see the current value but also you can change the value in the grid and value is changed for testing purpose.
and be sure that you are in debug mode not in release mode while testing the application.
|
|
|
|
|
in my windows form there is one textbox and one button and i attach same method with button for click event
and mouse eneter event for textbox. now i want to know when the method will be clicked then how could i
detect reason of firing the method of what type of event.means i want to detect the event type in method
tbhattacharjee
|
|
|
|
|
Why, on this earth, would you combine handlers for two completely different events on two completely different controls into one handler?????
If you want to run common code for both of these events and have to differentiate between the two, the easiest way is to NOT combine them into one handler! Seperate the handlers so that each handles it's own control and event. Then in your event handlers code, without using any code at all!, you can easily determine which control fired the event. You can then call the common code, in it's own sub or function, passing any parameters that your code needs.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Now, if you really want to make your code unreadable, you could keep the event handlers combined (lucky you, they use the same signature). Just check the object type of "sender" in your handler code.
Private Sub CombinedHandler(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click, TextBox1.MouseEnter
If sender.GetType().Equals(GetType(Button)) Then
' Button was clicked...
Else
' TextBox was entered...
End If
End Sub
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Is it possible in visual basic if we have a checkbox and on click of a checkbox a combobox is set visible true and this combbox automatically dropdown showing all the values. i just want that combox should open automatically when a checkbox is checked to show all the list. i donot want the user to click on the combo to see what is in the combo.
Is this possible ????????
Any help will be highly appreciated
Thanks in advance
Monica
|
|
|
|
|
Intellisense will show you all the properties of a member.
In this case, I found it by whipping up a project and looking through the properties.
comboBox.DroppedDown = true
will drop the combo. I assume you know how to make it visible. Invisible/visible ui components often suck, you should disable it instead, so it's visible but grey.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Christian Thanks
Your given option work with vb.net but not with viusal basic 6 .
any help regrading that
thanks
monica
|
|
|
|
|
Yeah, I thought of that after I replied. I'm sorry, I never use VB, my background is in programming. You really should specify VB6, because they are really different languages, and I think most people would assume VB.NET. It's my opinion that it would make sense for the two to be split into different forums, as C++ and managed C++ are.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hai i will sent code if any doubt pl.don't hesitate ask me
by
bodanampalli@yahoo.com
Private Sub Check1_Click()
If Check1.Value Then
Combo1.Enabled = True
Combo1.ListIndex = 0
Else
Combo1.Clear
Combo1.Enabled = False
End If
End Sub
|
|
|
|
|
Hi,
I know this is probably easy but...
I created a Windows UserControl in VB.Net and added a ComClass interface to enable me to host it in a classic Web Page and for that page to receive an event raised by the control. This works fine on my machine.
I placed the Control and the Web Page to IIS on a new server and now I get the control but the event has gone.
Any Ideas please ??
Thanks
Chubby..
|
|
|
|
|
please can i anyone help me with a subroutine that finda aname on an excel sheet colomn on sheet on and then checks sheet 2 on thesame workbook to find the match and if found, it deletes or clears every other names on that colomn on both sheet?
like on sheet1 pick a
on sheet 2 if a is found, clear others
|
|
|
|
|
|
pls this is my code for conversion of my excel to pdf but it isnt working.dont know where i am going wrong
Sub run()
'
' Makes some preliminary checks of the arguments.
' Quits the application is any problem is found.
End Sub
' ***********************************************
' XLS2PDF
'
' Converts a Excel xlsument to PDF using Adobe
' Distiller.
'
' Input: C:\Documents and Settings\Administrator\Desktop\*.xls
' sXlsFile - Full path to Excel xlsument.
' sPDFFile - Optional full path to output file.
' If not specified the output PDF file
' will be the same as the sXlsFile except
' file extension will be .pdf.
Function XLS2PDF(sXlsFile, sPDFFile)
Dim fso ' As FileSystemObject
Dim wdo ' As Excel.Application
Dim wxls ' As Excel.xlsument
Dim wxlss ' As Excel.xlsuments
Dim sPrevPrinter ' As String
Dim oDistiller ' As PDFDistiller.PDFDistiller.1
Set oDistiller = CreateObject("PDFDistiller.PDFDistiller.1")
If oDistiller Is Nothing Then
WScript.Echo "Error: Cannot create PDF xlsument. Adobe Acrobat " +
"Distiller is not available! Quiting..."
WScript.Quit 1
End If
Set fso = CreateObject("Scripting.FileSystemObject")
Set wdo = CreateObject("Excel.Application")
Set wxlss = wdo.xlsuments
sTempFile = fso.GetSpecialFolder(TemporaryFolder) + "\" + fso.GetTempName()
sXlsFile = fso.GetAbsolutePathName(sXlsFile)
' Debug outputs...
If bShowDebug Then
WScript.Echo "Xls file = '" + sXlsFile + "'"
WScript.Echo "Temporary file = '" + sTempFile + "'"
WScript.Echo "PDF file = '" + sPDFFile + "'"
End If
sFolder = fso.GetParentFolderName(sXlsFile)
If Len(sPDFFile) = 0 Then
sPDFFile = fso.GetBaseName(sXlsFile) + ".pdf"
End If
If Len(fso.GetParentFolderName(sPDFFile)) = 0 Then
sPDFFile = sFolder + "\" + sPDFFile
End If
' Remember current active printer
sPrevPrinter = wdo.ActivePrinter
'wdo.ActivePrinter = "Acrobat PDFWriter"
wdo.ActivePrinter = "Acrobat Distiller"
' Open the Excel xlsument
Set wxls = wxlss.Open(sXlsFile)
' Print the Excel xlsument to the Acrobat Distiller -
' will generate a postscript (.ps) (temporary) file
wdo.ActiveXlsument.PrintOut False, , , sTempFile
' This outcommented part was used while trying to use "Acrobat PDFWriter"
'Do While wdo.BackgroundPrintingStatus > 0
' 'Do nothing - just wait for printing to finish before closing Excel
'Loop
wxls.Close WdDoNotSaveChanges
wdo.ActivePrinter = sPrevPrinter
wdo.Quit WdDoNotSaveChanges
Set wdo = Nothing
' Debug output...
'If bShowDebug Then
WScript.Echo " Distilling to '" + sPDFFile + "'"
'End If
' Distill the postscript file to PDF
oDistiller.FileToPDF sTempFile, sPDFFile, "Print"
Set oDistiller = Nothing
' Delete the temporary postscript file...
fso.DeleteFile (sTempFile)
Set fso = Nothing
MsgBox ("done")
End Function
' *** MAIN **************************************
Call EchoLogo
Call EchoUsage
Call CheckArgs
Call XLS2PDF(arguments.Unnamed.Item(0), arguments.Named.Item("o"))
Set arguments = Nothing
MsgBox ("done")
End Function
MsgBox ("done")
End Sub
|
|
|
|
|
I love these 'it doesn't work' questions. What does it do wrong ? Have you contacted the people who wrote your PDF library ? Have you looked at their samples ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
will they give me the object name to be referenced?
|
|
|
|
|
Probably not, considering it's your code that is not creating the object. Have you stepped through your code, one line at a time and followed what it's actually doing? What line does the error show up on?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello there
the scenario is that I am fetching list of tables from database. and based on those tables I have to create a list of controls. like textboxes and labels to represent each data field. The form is dynamic with one combo box on top having all tables of Database in it.
now when user selects the other table it has to clear the list of controls and add a new set according to that selected table ( working fine upto now)
Problem ::: the size of panel is fixed and I have turned the auto scroll property to true. now when the table has more fields then scrollbar should come. but what is happening is if the big table is selected on the form load then it works fine. but once the form is loaded and then you change the table, then scroll bar does not appear and fields in last merge togather
any solution ????
|
|
|
|
|
HI Rizwan
From what i have understood you are adding controls to panel on a table select.If you are selecting this table from the dropdownlist.So you need to remove all previously added controls from the panel in the selectedindex event of the combobox
the code can be as follows
'where pnOutputs is the panel control
Dim NoControls As Integer = pnOutputs.Controls.Count
For i = 0 To NoControls - 1
pnOutputs.Controls.RemoveAt(0)
Next
once all the controls from the panel are removed u can add the new controls to the same panel control. I hope this is useful
Mandar Patankar
Microsoft Certified professional
|
|
|
|
|
well thanks for the code. some how i was doing the same thing. the problem is coming when the new controls are added and if they are more , Then the scroll bar does not come on the panel I dont know why ?
can you suggest any thing in this direction
thanks again for the code
|
|
|
|
|
well I was making achor =right for the newly added control. some how I removed it during testing and it started working fine. so if controls adding dynamically have anchor on it then scroll bar for parent control will not come..
cheers.......
|
|
|
|
|
Hye there
I wanted to change the color of Message box plus if possible wanted to change the text of buttons .
any comments ??
|
|
|
|
|
no way...
you have to make your own one if you want such behavior.
cheers,
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
As already stated the default message box wont do that (not without really hacking it ). Have a look at this article for another one. Free definable buttons are already included and as you have the sourcecode its only a small step towards colored boxes.
|
|
|
|
|
c is the variable for my datagrid current row index. when c is gotten by the dataset it is shown in textboxes. if i edit this row how do i get the datagrid/ table to accept the changes to that row?
Makniteasy
|
|
|
|
|
You can edit the row within the datagrid, or you can remember a primary key for the row, use it to do an UPDATE, and then rebind.
Christian Graus - Microsoft MVP - C++
|
|
|
|