|
Ok, that makes sense - I guess I didn't really think that it would get fired twice but it stands to reason I suppose since the first image is being de-selected that it would fire. I'm keeping with the double-click method now though as my client now prefers that over the single click anyway.
Cheers,
Mike
|
|
|
|
|
how can we scann the cd in VB.NET
jinal
|
|
|
|
|
Please be more specific. We can't help you if we don't know what you're asking.
|
|
|
|
|
I am currently using a VB.NET program to send out e-mails with
plain text bodies (plus one attachment). The emails are being
received as Rich Text messages (probably just my personal Outlook
default, because I didn't do this in the program), but there is no
actual formatting (italics, color, etc.) in the message body, which
is passed to from VB.NET to Outlook as an unformatted text String.
I want to start applying formatting to the message body. In
particular, my app has a RichTextBox, which has an Rtf property,
which returns a String formatted as RTF, which contains whatever
my users type or paste into the RichTextBox. That is what I want
to send as the body of the message.
Unfortunately all I get is garbage, like this:
{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\froman\fprq2\fcharset0
Times New Roman;}{\f1\fnil\fcharset0 Microsoft Sans Serif;}}
{\colortbl ;\red255\green0\blue0;}
\viewkind4\uc1\pard\f0\fs24 This is \cf1 rich\cf0 \b\i text.\par
\b0\i0\par
\pard\f1\fs17\par
}
This is of course precisely the content of the input String,
formatting and all. Clearly I have failed to clue Outlook in that
the message body should be interpreted as RTF, not plain text. So
how should I do this?
Here is my code:
=== Begin Example ===
Imports Outlook = Microsoft.Office.Interop.Outlook
...
Sub MailerRoutine(ByVal Subject As String, ByVal Recipient As String, _
ByVal Body As String, ByVal Filename As String, ByVal displayName As String)
Dim oApp As Outlook.Application = CreateObject("Outlook.Application")
Dim oItem As Outlook.MailItem = oApp.CreateItem(Outlook.OlItemType.olMailItem)
oItem.Subject = Subject
oItem.To = Recipient
oItem.Body = Body
oItem.BodyFormat = Outlook.OlBodyFormat.olFormatRichText
Dim bodyLength As String = oItem.Body.Length
Dim oAttachments As Outlook.Attachments = oItem.Attachments
Dim oAttachment As Outlook.Attachment
oAttachment = oAttachments.Add(Filename, , bodyLength + 1, displayName)
oItem.Send()
oItem = Nothing
oApp = Nothing
End Sub
=== End Example ===
For Oriensoft Technologies Pvt. Ltd.
Govind Yadav
Software Developer
E-mail: govindy@oriensoft.com
Tel: +91-22-67111555 Fax: +91-22-67111666
24 x 7 Support & Sales Toll Free : 1-800-22-5171 (India Only)
Web : http://www.oriensoft.com
|
|
|
|
|
I having problem when compare the date with the SQL, wats wrong with my code?
There are problem when i click the button on the function
"No value given for one or more required parameters"
It show the problem was in "Adodc1.Referesh"
but i not sure wats problem with it?anyone can help?
Dim today As Date
today = Now
sql = "select * from CO where [WarrantyValid]>today"
Adodc1.RecordSource = sql
Adodc1.Refresh
DataGrid1.Visible = True
|
|
|
|
|
campbells wrote: sql = "select * from CO where [WarrantyValid]>today"
Should this not be:
sql = "select * from CO where [WarrantyValid]>GetDate()"
|
|
|
|
|
i have try is but it said undefined function 'GetDate' in expression...
|
|
|
|
|
I think it should be:
sql = "select * from CO where [WarrantyValid]>" & GetDate()
|
|
|
|
|
or
sql = "select * from CO where [WarrantyValid]>" & today
|
|
|
|
|
Hi, I am working a project using visual basic studio 2005 as an interface design, microsoft sql 2005 as data store and crystal report for report engine. I am working with my local language by using unicode. However, the display on the interface itself it looks perfect however, when we view it with crystal report, it does not display properly at all.
For your understanding, Cambodia spelling is much difference from English. It has consonant with vowel and extended vowel which can be on the left, right, top, bottom, upper top, and lower bottom of consonant. The problems, is with the display of vowel, it seperated out.
Anyone outthere can solve this issue please help?
Regards,
Sithy
Sithy
|
|
|
|
|
Hi:
There is one parent form and several form mdichildren. In each child form there may be one to many controls. Information in one control is associated with other controls which may be in the same child form or in different forms.
The question is how to notify other controls if one control content is changed. What design policy (e.g. using design patterns such as Observer,or others) is appropriate ? Is there any sample I can refer to? Thanks.
David
abc
|
|
|
|
|
Your requirement is little unique so the solution would be unique too. I have one suggestion there might be many from others. well do the following
1. Build One Function on every Form with these parameters
public Function ControlAlert(FormName,Controlname,Value,any other parameter if required)
''' do here what you want to do if any other control has changed value
end function
2. on change of all the controls lying on all the forms. call one function which you will be created in your Global Module say
public sub ControlValuechanged(FormName,ControlName,ControlText)
' Over here you will get the reference of all the forms by using MDIForm Child loop and will pass the parameters to those forms in function
ControlAlert which you created on Step 1 like this
Dim frm As Object
For Each frm In MDIMain.MdiChildren
frm.ControlAlert(parameters)
Next
end sub
Rizwan Bashir
|
|
|
|
|
Your solution sounds viable. Yet I learned there are some design policies/patterns that can provide more elegant way to deal with that issue. I'll use your solution and explore design patterns as well.
Any advice besides the solution above is appreciated.
David
abc
|
|
|
|
|
i have a problem on merging 2 lists with 5 inputs on each list. the five inputs were already sorted and i'm trying to have a function to merge it. this is my defining function:
void merge(numA[],numB[],numAB[])
{
}
how can i merge the inputs in numA[] and numB[] and put them in the array of numAB[]?
|
|
|
|
|
Have a look at the Array.CopyTo method. If the final array also needs to be sorted than just make another call to Array.Sort to sort it afterwards.
|
|
|
|
|
Hi. I have a general question about custom controls. I want to make a control on a windows form that has a nonrectangular shape and the control itself is divided into several nonrectangular shapes. I need to divide the control because i want the different areas in it to have different properties.
I'd be very grateful if someone gives me a general advice on how to achieve that. I've already tried with transparent labels over a picture representing the control, but it is not nearly as good as i need it to be.
Thank you in advance.
|
|
|
|
|
A possible cheat/workaround...
Depending on how graphic you want your controls to be here's an idea (untested - something I've thought of doing but never got around to).
1. Draw your custom control in Flash (I choose Flash coz it's simple and powerful),
2. Add a Shockwave Flash object to your toolbox.
3. Create a new custom control, adding the Flash object to it.
4. Give the control applicable events like onClick, onMouseEnter/Leave, etc.
5. Use GDI+ to cut out the unwanted square bits around your control (using GDI+ available here[^]).
6. Build and test.
As mentioned earlier, I have yet to try this myself so I'm not completely sure that it'll work tho I don't see why it shouldn't given a little elbow grease. The choice of doing it this way is yours, you take my advice at your own peril
Good luck, if you get it to work please let me know - i'd be very interested to see.
|
|
|
|
|
Thank you for the reply. I am not used to using any of the macromedia products but here's a good reason to try them out As soon as I finish the control i will write you back.
Thanks once again.
|
|
|
|
|
Hello,
I'we been looking for tutorials about how to create buttons that reacts mouse events in Direct3D application. So basicly I just want to create a normal button but later on I need to make different shaped buttons, like triangle and round.
I understand the basic consept behind the buttons, but I can't figure out how to calculate the coordinates when the mouse is over buttonarea. Basicly only thing that should be somehow calculated is that where are the coordinates that are on button are. I was thinking to draw the buttons with vertixes, but the buttons are invisible for the user, because the buttons only work as a hit points and they register that if user presses the mousebutton over them.
Any idea where I could find tutorials for these?
|
|
|
|
|
How can I extract an embedded or attached file (say MSWORD, MSEXCEL, or PDF) inside PDF and save it programmatically, using VB.NET. I can see that you can walk through different annotations in a page but how can you determine the presence of attached file and open it and saving it programmatically.
any suggestions????
|
|
|
|
|
add handler to this procedure at the end like
Private Sub Combo1_Change() handles combo1.change
Rizwan Bashir
|
|
|
|
|
' this one is the normal generated code when you double click on the combo in design mode. and put your calculation in here
Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged
End Sub
Rizwan Bashir
|
|
|
|
|
you probably need to put that code in the Click event instead of the Change event.
hth
|
|
|
|
|
Hi.
Im trying desperatly to print the contents from a mdi children form, which has the look of an excel worksheet. I have a subroutine that via gdi+ creates a bitmap om the viewable part of the form. But I need to print even the part that you have to scroll to see.
It seems that is impossible to use BitBlt for this purpose, since BitBlt only can draw the viewable part. Right? If so, what should I then do? It must be possible to print? Im quite frustrated here, since it must be possible to print event the parts that aren´t in view.
If BitBlt doesnt work, can I put each control(textboxes, panels, etc) on the printdocument manually?
|
|
|
|
|
Form.PrintForm doesnt work?
|
|
|
|