|
hi Nilish,
for enabling use following Key combination
ctrl + k + u
-- modified at 6:06 Saturday 5th May, 2007
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
|
|
|
|
|
|
what is the utility of immediate window .i was getting opened in both the compile time as well as the run time
|
|
|
|
|
its to find the value of any int/char/string...
suppose you have a string STR that stores the value 'ABC' at runtime.
debug the project. after you have passed the line where this STR becomes equal to 'ABC', open up the immediate window and type '?STR' and press the enter key. you will see the value 'ABC' returned.
this is the same with any variable or any property of the objects.
try this..
when debugging, take the imm. window and enter '?Me.Name'. you can see the current form's name..
|
|
|
|
|
Then what's the diffeence between add-watch and Immediate window?
|
|
|
|
|
you can see the difference in the 'Watch window' itself..
during debugging, select any variable from the code and right click in the watch window and select the add watch option. you can see many options inside.
morover watch displays the value, type and context of the variable, but imm window shows only the value. also, imm window doesnt have the variety options that is provided by the watch window... got it?
|
|
|
|
|
The immediate window let's you query variables and execute individual statements while in design mode. You can read more here[^].
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
|
Hakmeh Mohannad wrote: how can i make this possible
Learn how to write sql statements. Make sure you keep your code safe from injection attacks...
|
|
|
|
|
friend...for this, first learn to write simple queries..
for this case, only a simple select query will be enough, but first u must hav a table to store the uname and passwd... so first try those..
-- modified at 4:45 Saturday 5th May, 2007
|
|
|
|
|
|
I have a compare to sort the order of SubItems in a ListView and it works great, but... If the ListView shows Groups nothing is sorted. Here's the compare function from my class. How can I make it work when Groups are shown?
<br />
Public Function Compare(ByVal x As Object, ByVal y As Object) As Integer _<br />
Implements IComparer.Compare<br />
<br />
Dim ItemA As String<br />
Dim ItemB As String<br />
<br />
Try<br />
ItemA = CType(x, Windows.Forms.ListViewItem).SubItems(_Column).Text<br />
Catch<br />
ItemA = ""<br />
End Try<br />
<br />
Try<br />
ItemB = CType(y, Windows.Forms.ListViewItem).SubItems(_Column).Text<br />
Catch<br />
ItemB = ""<br />
End Try<br />
<br />
If _Ascending Then<br />
Return [String].Compare(ItemA, ItemB)<br />
Else<br />
Return [String].Compare(ItemB, ItemA)<br />
End If<br />
End Function<br />
Cheers
|
|
|
|
|
Hi
I am trying to create BMP file to print on Epson Receipt printers using OPOS. Epson printers only allow - BMP File which are Monochrome, 16 color (4 bit ) or 256 Color (8-bit) and should be uncompressed format.
I tried working 1bppIndexed Bmp. However the printer does not seem to except it. Currently the technique I am using is saving the image first as "GIF" ( 8 bit ) and then again saving it as bmp. However would like to know any techniquie for saving Uncompressed monochrome ( 1 bit ) bmp in Vb.net
Thanks
Satish
|
|
|
|
|
I have two arrays. The first holds titles, the second holds text to see if the titles should be in a different case or bold. These names are then displayed in a Combo Box. Please bear with my simple example but it is about the only way to discribe what I want to do.
vNames = Array("Smith", "Hudson", "Jones")
VString = Array("H","I","h","i")
So I want to search the above vNames array for the vString, and if so I need it to be set to bold
This is what I was thinking:
For i = 0 To 2
For j = 0 To 1
If InStr(vNames(i), vString(j)) <> 0 Then
cmbName.FontBold = True
End If
Next j
Next i
But when I do this all three names are in bold, when my thinking is just the first two names should be bold.
Thanks in advance for any advice,
Dan
|
|
|
|
|
I'm assuming you're using VB6. This won't work because the FontBold property of the ComboBox is for all of the items in the ComboBox, not ones you pick. It's either all of the items are bolded, or none of them.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
I am actually using vba for Word 2003, which I believe is much closer to VB6 than to anything else.
And you are right about it doing the whole list. One the name is picked it is added to a Word document text form field, what I believe I will need to do is this: set my txtName.Value, test for the string, then bold if need be.
Thanks for the reply.
Dan
|
|
|
|
|
The reason why they are all bold is because you are changing the combobox font to bold not the individual entry to bold.
|
|
|
|
|
Thanks for pointing this out. I think I have found a way to handle this with the selected value, not the combo box.
Dan
|
|
|
|
|
Hi guys
A little background info:
I receive XML files with the same data in different formats. The data from these XML files has to be stored in 3 different SQL tables.
What I am trying to do is write a generic code in VB.net that will read these XML files and may be based on some schema definition populate the XML data in the 3 different tables.
I have written code that does not refer any schema definitions and is good only for one XML format any ideas on how to write generic code to do so??
Any help would be appreciated.
Thank you in advance
Ziaous
|
|
|
|
|
I am not sure on the specifics of your problem, but depending on how the xml data is written, you could read it into a dataset using the schema.
<br />
<br />
dim data as new dataset()<br />
data.readXmlSchema("Schemafilename")<br />
data.readXml("xmlfilename")<br />
<br />
and the data will now be in (a) table(s) in that dataset, like I said this will not work for a lot of xml data, but it is a start.
|
|
|
|
|
Hi Kevin
I have no issues loading or paring an XML file, what I am trying to do is depending on the given xml schema definition or DTD the code should be capable to load the XML table in the appropriate table.
Right now I read an XML file in VB.Net pass it to SQL code and there I have hard coded attribute paths that help me select data from XML file and insert into the table, like:
Insert Into StoreInfo(StoreNumber,StoreName)
SELECT distinct StoreNumber,StoreName
FROM OPENXML (@XmlDocId, '/Root/Data/StoreInfo',1)
Now, instead of using this method I want the code to read XML file as well as a schema def. and create a dynamic insert query that I can pass to the database...
I hope that makes sense.
Thanks
|
|
|
|
|
If you are using SQL-Server then you may be able to use Microsoft's SQLXML component to do this less painfully.
|
|
|
|
|
|
I have a vb.net application in which i have an add-in in the powerpoint. Now when i insert a new slide and right click on the "click to add title" or "click to add subtitle" i get a context menu pop up. I want to add my own menu items to this pop up. Can anyone suggest me how to do tht. I will be writing the code to add the menu items in the right click event of the pptapplication i.e
Private Sub pptApplication_WindowBeforeRightClick(ByVal Sel As Microsoft.Office.Interop.PowerPoint.Selection, ByRef Cancel As Boolean) Handles pptApplication.WindowBeforeRightClick
End sub
I dont want to create a new context menu. I want to add the items to the existing context menu. someone pls help
chakor
|
|
|
|
|
So many times a day are you going to ask this question?? The more you do this, the more you will most likely get ignored.
It takes to research some of this stuff, especially doing Office Interop. The base of developers doing work in Office is very small, so it's not real likely that your post will get answered unless you go to a forum that specializes in it, like this one[^] on MSDN.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|