|
If everyone know how to add icon to ToolStripComboBox in VB.NET 2005, please help or give me some example
................
|
|
|
|
|
I don't how change title bar when java script alert in WebBrowser Control in VB.NET
................
|
|
|
|
|
I don't how to getting start with mobile applcation with VB.NET 2005?
Can u give me example?
................
|
|
|
|
|
hello hi,
pls give
what is the differance between empty and null
vipin paliwal
|
|
|
|
|
Null is zero length string
Empty depent on
................
|
|
|
|
|
That depends on the context.
In programming null is a reference to nothing, or a pointer that doesn't point anywhere. In VB the Nothing keyword is used for a null reference.
In programming empty has no special meaning, it's just something that doesn't contain anything. For instance a string with the length zero.
In databases null is used in fields that contains no data. Any field can contain null, unless the table specification forbids null in the field.
An empty value in a database is a text field than contains no characters. A numeric field or date field can not be empty.
---
b { font-weight: normal; }
|
|
|
|
|
Hi.
I wrote some VBA code in Office 2000, MS Access, that calls Excel, creates a plot, and then sets the background image for the plot
<br />
Set coChartObject = wsWorksheet.ChartObjects(1)<br />
coChartObject.Chart.PlotArea.Fill.UserPicture ("c:\images\Bkgrnd1")<br />
coChartObject.Chart.PlotArea.Fill.Visible = True<br />
When I try to run this code in Office 2003, I get an error on the line that sets my background image - it doesn't recognize the function.
I was able to "Watch" this object and when I tried to expand its structure, I can only get to the "Fill" field - there is NO "UserPicture" field under the Chart object in Office 2003
How do I set the PlotArea's background image in Office2003/VBA code?
Thanks,
Johnny
|
|
|
|
|
|
In Office2003, I'm using the Object Browser (F2) in VBA coding window to see what's available.
When I search for my coChartObject (dim'd coChartObject As ChartObject), I don't see Chart as a member. This is probably why failing in Office/Access 2003 VBA code.
Here are my dim statements and code that worked in 2000 (again)
<br />
Dim wsWorksheet As New Excel.Worksheet<br />
Dim coChartObject As ChartObject<br />
...<br />
Set wsWorksheet = oXLApp.Parent.Worksheets("XYplot")<br />
wsWorksheet.Activate<br />
...<br />
Set coChartObject = wsWorksheet.ChartObjects(1)<br />
coChartObject.Chart.PlotArea.Fill.UserPicture (strImagePathname) 'FAILS HERE in 2003<br />
coChartObject.Chart.PlotArea.Fill.Visible = True<br />
At this point, I'm not worried about backward compatability - I just want to set a background image in Office 2003 (from VBA code in MS Access directing MS Excel.)
Huge thanks to all who can help. will check link above
Johnny
|
|
|
|
|
Ok, I am really frusterated because I can't get the right "Chart", "Charts(i)" or parent object to do:
<br />
Charts(2).ChartArea.Fill.UserTextured "image.gif"<br />
In Office2003/VBA Object Browser, I typed in "UserTextured" to find what object I should use and worked my way up. Still no success
At my disposal are:
<br />
dim oXLApp as Object<br />
Set oXLApp = GetObject(,"Excel.Application") 'yadda yadda yadda<br />
...<br />
Set oXLApp = GetObject("MyExcel.xls")<br />
...<br />
dim wsWorksheet As New Excel.Worksheet<br />
dim coChartObject as ChartObject<br />
dim chChart as New Excel.Chart 'added in vain, but to no avail<br />
...<br />
Set wsWorksheet = oXLApp.Parent.Worksheets("XYPlot")<br />
wsWorksheet.Activate<br />
...<br />
Set coChartObject = wsWorksheet.ChartObjects(1)<br />
' old stuff works in 2000, but not office 2003<br />
...<br />
'Tried unsuccessfully<br />
Set chChart = oXLApp.Charts(0) 'anything I put for index failed<br />
chChart.ChartArea.Fill.UserTextured ("myImage.gif")<br />
<br />
'failed!<br />
coChartObject.Chart.ChartArea.Fill.UserTextured ("myImage.gif")<br />
Set chChart = coChartObject.Chart<br />
...<br />
Argh! This is really chapping my hide
Johnny
|
|
|
|
|
Hi all,
First off, this is a great site for resource and this is the first time I have posted.
Im in need of a little help please.
I have just installed VB.NET for the first time today. I am used to programming in VB6 and have now installed vb.net 2003.
I have the requirment to create an application in vb.net that is for the windows ce platform to capture a screen shot and save it as a bmp or jpg. Doesnt matter which format as long as it saves in the app.path
Ive been looking at some sample code for vb.net that used the clipboard.getdataobject() but when I load a new project for Windows CE the clipboard.getdataobject doesnt exist!! Am I being stupid or have I missed somthing?
So two questions really:
1) Does anyone have any sample code for screen capture with vb.net for Windows ce (4.1 im using on my device).
2) Please could someone explain why I do not have the same syntax commands when creating a project for windows ce on visual studio .net 2003 compared to a windows application ?
Thanks in advance!
If you would like to reply to me directly please reply to matt@mattsgadgets.co.uk
Thanks again!!
|
|
|
|
|
Dear all,
I would appreciate your help so far. I am a new learning/working with VB6 and I am working on a program to create a Email application in VB6, this program will read a log file and and scan a "error" text in this log file.
If the log file is not contain an "error" text string, it will send a message to someone with a design text in the text body.
If the log file is contain an "error" text string, it will send a message to someone with a number of error in log file.
I really dont understand how it work, and if you can help me out, would you please show me how to create it or any code would be a big appreciation.
Thanks,
Tram88
|
|
|
|
|
I write a program to print an undee chart.The main code as follows:
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
AddHandler PrintDocument1.PrintPage, AddressOf drawpictoprinter
PrintDocument1.Print()
End Sub
Private Sub drawpictoprinter(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs)
Dim pg As Graphics
pg = e.Graphics
pg.TranslateTransform(xtran, ytran) 'xtran,ytran >0
pg.ScaleTransform(xscaletran, yscaletran)
Dim j As Integer
Try
For j = 0 To rwrecord - 1 'rwrecord is the unbound of
'array redraw or ydraw
pg.DrawLine(redrawpen, xredraw(j), -yredraw(j), xredraw(j + 1), -yredraw(j + 1))
Next
Catch ex As Exception
Throw ex
Finally
pg = Nothing
GC.Collect()
End Try
End Sub
when i press button5 the first time.what do you think the output chart of printer?And the second time?The third time?....
When i do it the first time.Output chart is an undee chart that i want to be.But the second time when i do it.Two undee chart appear.and One is upper,the other is under it.The horizontal distance is xtran,The vertical distance is ytran.
I do think the focus is pg.TranslateTransform(xtran, ytran) and
pg.ScaleTransform(xscaletran, yscaletran)
I run the program step by step.what i found are:
1>when i press button5 the first time.drawpictoprinter method execute one
time
2>When i do it the second time.drawpictoprinter method execute two times
3> And so on
WHY?
Any care will be appreciated much
Best regards
ICQ:258-235-734
MSN:msnadair@hotmail.com
-- modified at 9:19 Friday 2nd June, 2006
|
|
|
|
|
codeadair wrote: AddHandler PrintDocument1.PrintPage, AddressOf drawpictoprinter
This is causing it. You are adding the event handler everytime you press your button. Either unbind (RemoveHandler) it after you have finished or make sure you bind it only once.
|
|
|
|
|
Hi,
I am trying to retreive a string between a tag in my HTML page. I can get the string if it is <td>The String is here</td>. But the problem is when it is like this <td bgcolor="#FFEFCE" width="40%" align="center">The String is here</td>, the result I may get is 'bgcolor="#FFEFCE" width="40%" align="center">The String is here'. How do I get rid of the other unwanted stuff?
Please do help me, I have been cracking my head to solve this. Thank you
J Liang
|
|
|
|
|
Have you tried using Regular Expressions, from the System.Text.RegularExpressions namespace?
There are several articles to get started with Regular Expressions here on the CodeProject. Something like the following regex might work (note I havn't checked this properly): \<td[^\>]*\>([^\<]+)\</td\>
You know you're a Land Rover owner when the best route from point A to point B is through the mud.
Ed
|
|
|
|
|
Thanks Ed, for replying.
I have used the Regular Expression, thanks for showing me the syntax, it works, at least now I can continue with my work.
Just one more thing, how do you guys know the formatting like "\<td[^\>]*\>([^\<]+)\</td\>" is to get whatever between <td></td> and also cut off the rest and get the string between only? I'd been searching for this 'dictionary', so that I do not need to ask around always on how to get the expressions I want.
Thanks
J Liang
|
|
|
|
|
J Liang wrote: how do you guys know the formatting
Practice and experience! It's just like another programming language, albeit with a very concise syntax, but once you know how to use it it is very powerful indeed, the only major penalty is the performance one but you can compile Regular Expressions to .NET code by using Regex.CompileToAssembly .
There are some articles here on CP as I mentioned, one is very good but I couldn't find it when I was writing the last message. Just do a search for "regular expressions", some will be related to C#, VB.NET or C++ but they all share more or less the same syntax.
Other useful sites are:
Regular-Expressions.info[^] - All information about regular expressions for different languages.
The Regulator[^] - A regular expression designer (in .NET)
RegexDesigner.NET[^] - Another regular expression designer (in .NET by Chris Sells)
RegexLib [^]- A library of useful regular expressions.
By the way if you want to extract the text, use a named group e.g. \<td[^\>]*\>(?<text>[^\<]+)\</td\> <td[^\><text>, you'll notice that the parentheses now have a name following them in the square brackets (basically the syntax for a named group is </td[^\>(?<name><name><span style="font-style: italic;">regex</span>)</name> <td[^\><name>). You can then retrieve the text that matches that group by something like the following:
</td[^\>
<td[^\><name>Regex.Match(inputString, "</name></td[^\>\<td[^\>]*\>(?<text>[^\<]+)\</td\><td[^\><name><td[^\>", RegexOptions.Compiled).Groups("text").Value</td[^\></name></td[^\> <td[^\><name><td[^\>
(Sorry if I got the syntax slightly wrong for the code but I primarily use C#). You can see that you can access one of the groups of text through it's name as specified in the regex.
Hope this helps. I actually learnt most of my regex stuff from Francesco Balena's "Programming Visual Basic .NET" book by the Microsoft Press. (Yeah, I started out with VB then moved to C#) and it's a very good general book on .NET (1.1).
</td[^\></td[^\>
You know you're a Land Rover owner when the best route from point A to point B is through the mud.
EdLast modified: 03 June 2006 05:15:40 -- Quote
|
|
|
|
|
I don't know whether am I asking too much but when asking about this question, I have a major problem with getting data from a table. The reason I wanted to identify <td></td> is because of the columns that hold the data I wanted, the code snippet is like this:
<table border="2" cellpadding="1" cellspacing="1" style="border-collapse: collapse" bordercolor="#808080" width="100%">
<tr>
<td width="40%" colspan="4" bgcolor="#FFEFCE" align="left">
<b>Policy No</b></td>
<td width="40%" colspan="4" align="left"> 12345678</td>
</tr>
I wanted to extract 'Policy No' and '12345678' and save it into database but there are tons of row like the above and some are not relevant to my search. I try to split them into group like those with <b></b> is the name for that row and those without it is the value to that row, but it does not work either as there are other <td></td> with value that I don't want to retreive. Example:
<td width="100%" align="right" colspan="2"><font color="green"><b>John Smith, 03/06/2006</b></font><br/><hr/></td>
The code snippet I have is from another programmer and I can't ask him to alter any thing on the page. Maybe I can get some idea from you if you don't mind, I have been cracking my head for a algorithm for 3 days now, just can't find any best idea.
Anyway, thanks for the info, Ed, and the guidance too. It's my first time using VB.NET and this Regular Expression method. I'll go through those articles you told me, need to learn thoroughly about this Regular Expression.
Regards,
J Liang
-- modified at 9:38 Saturday 3rd June, 2006
|
|
|
|
|
Hi all,
I have a ToolStripMenu in my application. I would like to change the
cusor from default to help cursor when i click on a item in the
ToolStripMenu. I was successfully able to change the cusor, but when
moved the cursor on certain items, the cursor again changes to default.
When moved away from such items, cursor changes to help cursor. I later
found that the help cursor remains unchanged for items which has help
for those items are enabled.
So when i move the help cursor to a toolstripmenu item, cursor changes
to default cursor. I would like to know how to avoid this change in
cursor when moved to toolstripmenu item as there is no property to
enable help for a toolstripmenu item.
I would appreciate your help in this regard.
Thanks,
Sugan
Chennai
|
|
|
|
|
How did you change the cursor? Have you used Cursor.Current = ... ?
|
|
|
|
|
I used the following.
Me.cursor = system.windows.forms.curosrs.help
What happens when i use this is cursor changes to a help cursor. But when this cursor hovers over components which does not support help, it changes back to default cursor. For a toolstripmenu item there is no property available in .Net 2.0 version to enable help for that component. Hence when i move the cursor over it, the cursor changes back to default cursor.
Pls help.
Thanks,
Sugan
Chennai
|
|
|
|
|
Try setting Cursor.Current = Cursors.Help instead. It changes the cursor for the whole application.
|
|
|
|
|
In fact
Cursor.Current = Cursors.Help
does not work at all.
Only Cursor = cursors.help works.
Even then, when i move the cursor to a menu item in the form, the cursor changes back to the default cursor. When i move out of the menu item, cursor changes to help cursor.
Thanks,
Sugan
Chennai
|
|
|
|
|
Is there no one who has a resolution for this issue.
I'm not getting any resply for this issue in most of the forums. Is it such a big deal to solve this???
Sugan
Chennai
|
|
|
|