|
I am working on large-scale project entitled as MIS (Marketing information System). As I told you that I am using Vb 6 as front end, Ms Access as back end and Crystal report 8 as reporting tool.
1) In the project it is required to save dealer’s photo, and it should be shown in individual dealer’s detail report, which will include his/her image. I had taken Common dialog box control to select image and display it in image control.
2) The size of database is very large then, which will be useful from the following?
i. to store image to database?
(But it makes database larger in size which leads to slower access)
ii. Saving path of image in database
To keep database safe I want to try the second option first. Instead coding directly into project, I want test the logic into small program first. As we know that by use of common dialog control we can select image and show it in image control. Also same path can be stored in database. Also we can retrieve the path from database and show it image control.
Until here all things are ok. Now problem is that how to show the image in crystal report. Usually we pass the fields directly to crystal report by sending sql-query to it.
If you require more details, please let me know. I will make it available.
Regards,
Kiran.
-- modified at 1:42 Saturday 4th November, 2006
Kiran Sajanikar
Software Engineer
CleverBIT softwares.
Pune.
|
|
|
|
|
How can i swap two values in database which are retrived in a combobox. Means in selectitem index i m using a event. But I have no idea how should I code for that event.
|
|
|
|
|
Pl. explain by an example
cheers,
Akhilesh Yadav
|
|
|
|
|
|
Hello,
I have this code below but i want to specify it in 24hr format.
time = ScheduledTime.ToString("hh:mm")
I have my sql server 2005 database set for nvarchar but the actual input that is always entered as a date along with the time. e.g. 2/11/2006 10:34
I would just like to have the time specified.
Thanks,
Steve
-- modified at 4:34 Friday 3rd November, 2006
|
|
|
|
|
Try using captial HH for example
time = format(ScheduleTime, "HH:mm")
this should provide the time in 24 hour system where as
time = format(ScheduleTime, "hh:mm")
will provide the time in the 12 hour system
Steve Jowett
|
|
|
|
|
Thanks,
Thanks worked great.
|
|
|
|
|
I m using combobox to get values from database. I want to swap two values of dropdwon list with each other in an event. Can any one give me idea of that event.
|
|
|
|
|
Which values? Is it to be sequential e.g. swap item at index 0 with item at index 1? Or non-sequential e.g. swap item at index 0 (or any other) with any other item in the index (swap item 4 with 9, 2 with 1, 6 with 13)?
Either way the event that you're looking for is the SelectedIndexChanged event.
|
|
|
|
|
Safecom wrote: I m using combobox to get values from database.
No, you are using a DataProvider to get values from the database.
Those values are provided to you in a stream.
You can put those values into various containers, eg. a DataTable, an Array of List Objects, etc. which can then be fed or bound to your control.
They should be encapsulated in a list of business objects, (preferably using a list type that implements IList - ArrayList is good) which is then manipulated (sorted according to your business rules, which may change momentarily by user gestures such as clicking radio buttons, checkboxes, etc.) and then presented to the user in the ComboBox. You may need to add a suitable sort key to your business object to help with the re-sorting/swapping.
You can do all that off the DropDown event if necessary, but you will take a performance hit. It would be better to evaluate your conditions beforehand if possible, using other control events, and re-sort the list (and rebind the list to the control) before the user drops it down.
SelectedIndexChange is too late. The user has already seen the list.
|
|
|
|
|
Hey guys,
if i have a Dll build using C#
can i import it into Vb.net?
wel i tried (in vb.net 2005) ADD REFERENCE,the DLL was added but i couldnt see the Dll in the Solution Exploere,thus I coulndt call the DLL
Regards
Ramy
|
|
|
|
|
It should be in your references?
"a fool will not learn from a wise man, but a wise man will learn from a fool"
"It is hard to fail, but it is worse never to have tried to succeed." - Theodore Roosevelt
"Success is going from failure to failure without losing your enthusiasm." - Winston Churchill
My Website || My Blog
|
|
|
|
|
Here's how ours is set up:
We have a Solution file, with a number of VB.Net projects in it, and one CS project, which I think was supplied by a vendor as a hotfix.
One of the VB projects has a reference to the CS project, and creates an instance of the component in it.
The project is obviously visible in the Solution Explorer, and also in ObjectBrowser.
Both versions of the component in the CS project show up under the same Namespace in the ObjectBrowser, however one of them has [Runtime = v2.0.50727] annotated after it.
(This may have no bearing on your solution.)
So it looks like you need a solution file, with the CS project added to it, and a reference set to it in the calling VB project.
Hope this helps.
Dave
|
|
|
|
|
charchabil03 wrote: ADD REFERENCE,the DLL was added but i couldnt see the Dll in the Solution Exploere
Adding a reference to the DLL does not make it part of your project/solution. It allows you to import and use the objects in that DLL as COM objects. It's not added to your project.
charchabil03 wrote: thus I coulndt call the DLL
You've made an incorrect assumption. Once you add a reference to the DLL, you either have to Import the namespace(s) that DLL exports or specify the fully qualified name of the object you want to use in your code. For instanceif you added a reference to a COM-based HPortalLib.dll file, and it exported a namespace called HPortalLib, you add an Imports statement to the top of file you want to use it in like this:
Imports System.IO
Imports System.Drawing
Imports System.Text
Imports AxHPortalLib
You would add an Imports statement for the Ax version of the namespace because that would be the .NET Runtime Callable Wrapper around the non-.NET component that you're using.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
i AM WRITNG A MULTICAST CHAT APP IN LAN USING TCP IP .
IALSO WANT TO ADD A FILE TRANSFER PART IN WHICH WE CAN TRANFER VIDEO AND AUDIO FILES .I TRIED BUT CUD NOT DO . CUD DO WITH SOME HELP FROM U GUYS
|
|
|
|
|
how are you sending each message over?
i wrote one that uses a class that is serialized sending it to a central "hub" (nt server) that then sends it to the appropriate number of users that belong to the room. otherwise how do you specify who the message is for (which PC does it goto), who it came from, which room does it belong to, etc.
if you use a similar method, then you can specify the name of the file, who sent it to the person, etc. so convert the file into a byte array and send it over with the information in the class and the convert it back to a file on the PCs end.
|
|
|
|
|
Give Me some Code for compressing and saving the image
|
|
|
|
|
In the image box you have sub that saving file. Image.Save(...)
Image compression is big topic that people trying to find ways to do it. The GIF, JPEG, PNG are common formats that developed specially for picture compression.
|
|
|
|
|
I am trying to convert all text in a Rich Text Box to Rot-13. But the code I am using doesn't work. By not working I mean it doesn't convert.
<br />
Dim AllText As String<br />
AllText = RichTextBox.Text<br />
Dim Part As Integer<br />
Part = AllText.IndexOf("a")<br />
Dim FileName As String<br />
FileName = AllText.Replace(Part, "Z")<br />
Dim Part2 As Integer<br />
Part = AllText.LastIndexOf("b")<br />
FileName = AllText.Replace(Part2, "Y")<br />
Any suggestions would be appreciated. Thank you!
|
|
|
|
|
Please define your need.
Do you want to change A to Z, a to z, B to Y, b to y and so on for all the ABC ?
|
|
|
|
|
Yes, I want to convert "A to Z" and "B to Y".
|
|
|
|
|
Try this:
<br />
Dim S As String = RichTextBox.Text<br />
Dim I As Integer<br />
<br />
For I=0 To S2Rot13.Length - 1<br />
If Asc(S(I)) >= Asc("a") AndAlso Asc(S(I)) <= Asc("z") Then <br />
S(I) = Chr(Asc(S(I)) - 32) ' TO UPPER CASE<br />
ElseIf Asc(S(I)) >= Asc("A") AndAlso Asc(S(I)) <= Asc("Z") Then<br />
S(I) = Chr(Asc(S(I)) + 32) ' to lower case<br />
End If<br />
Next I<br />
Instead of going on every letter of the ABC and the abc, we going on the string and check the Ascii code.
This saving time if its string that smaller the 46 characters - instead of running 46 times every call we run as long as the string.
|
|
|
|
|
UltraCoder wrote: Dim Part2 As Integer
Part = AllText.LastIndexOf("b")
FileName = AllText.Replace(Part2, "Y")
Are you sure the code is right? Shouldn't it be
Part2 = AllText.LastIndexOf("b")
Chandra
|
|
|
|
|
Yes, thank you for pointing that out, but it still doesn't work.
Thanks anyway though!
|
|
|
|
|
UltraCoder wrote: Dim AllText As String
AllText = RichTextBox.Text
Dim Part As Integer
Part = AllText.IndexOf("a")
Dim FileName As String
FileName = AllText.Replace(Part, "Z")
Dim Part2 As Integer
Part = AllText.LastIndexOf("b")
FileName = AllText.Replace(Part2, "Y")
Maybe you can try this?
Dim s as String<br />
Dim s1 as String<br />
Dim i as Integer<br />
<br />
s = RichTextBox.Text<br />
For i = Asc("a") To Asc("z")<br />
s = Replace(s, Chr(i), Chr(i - 32)) ' - 32 gives upper case<br />
Next i<br />
s1 = ""<br />
For i = 1 To Len(s)<br />
s1 = s1 & Chr(Asc(Mid(s, i, 1)) + (25 - 2 * (Asc(Mid(s, i, 1)) - 65)))<br />
Next i
Hope this helps
Chandra
|
|
|
|