|
Hi,
Check with Datagrid property [onSort] in property window.
Regards,
Manowj
|
|
|
|
|
Hi,
Check in Property Window of Datagrid [onSort].
Regards,
Manowj
|
|
|
|
|
please mention the version of ide u use.in vb 2005 this property is available on property window.go n chk there
|
|
|
|
|
Hi,
I have two kind of report that i want to show in one crystal report viewer, for selecting the report i make another form, this what i do
1. I create 'FormControlReport' for selecting the report
2. I put to datetimepicker in the form named 'From' and 'To'
3. I put 1 combobox named 'Department', it use to select department
4. I put 1 listbox named 'listReport', i use to select report
5. I put i commandbutton name 'ViewReport'
6. I create another form name 'FormViewer'
7. I put Crystal report viewer in the form, i name it 'CRV'
Now, in the FormControlReport i use datetimepicker to select period and combobox to chose department and i chose one of the report that i want to show by selecting report in listReport, when i click the ViewReport, it send command to run the report in FormViewer base on the parameters that i define in FormControlReport, it give me headache since a week
Anybody can help me with this problems please,
Abbas
|
|
|
|
|
CRV.ReportSource = OtherReport
|
|
|
|
|
Subject says it all, I'm looking for something that I can easily use to reproduce as closely as possible the control used in the firefox downloads window. I figured it'd make a great layout for a window for handling file transfers in an application. Does something like this already exist, or at least something close to it?
|
|
|
|
|
Hello, I do appologise for the length of this question, but I cannot explain with providing documentation.
For days now I have been trying to write a COM component in VB VS 2005, I have discovered the world of interop amongst things. The application I am working with can call external COM or DLL module which is what I am trying to create (see below for "Documenation".)
My Code / process
New Project, Class -> Add item COM component -> add function
/* simplified calling the function should return what it is passed
Public Function test(byval hello as string) as string
return hello
end function
Create a key using sn.exe, modify assembly file, build project. Copy files onto application server, run regasm /tlb:*.tlb *.dll -> run gac util /i *.dll both return successful. Using oleviewer I can see my class and the method / function. When I test with the application it returns negative. Although I have tried a 100 things this question is already too long
Using VB6 I can add a reference to my module and call the function OK.
Documentation
When a DLL or COM custom function is called, it is passed a configured subset of the current contact data as a character string. Similarly, the custom function is expected to return a set of updates to the contact data as a character string. The following topics provide direction on working with the contact data programmatically.
● Datatype and declaration
● Contact data string layout
Type Sample declaration
COM HRESULT = CustomFunction(BSTR bstrInput, BSTR bstrOutput )
DLL long = CustomFunction( char * pInput, char * pOutput )
B.1.1 Datatype and declaration
Parameters storing the contact data input and output parameters must be declared as single byte character strings in DLLs and as BSTR (wide) character strings in COM modules. Table B-1 shows sample declarations:
The type of character data that may be stored and passed in both the input and the output parameters is restricted to ISO-8859-1 compatible characters.
● When the interface type is a DLL component, the characters must be ISO-8859-1 single byte characters.
● When the interface type is a COM component, the parameter contents must be encoded as UNICODE codepage 28591 (ISO 8859-1 Latin 1).
B.1.2 Contact data string layout
Contact data is passed to and returned from custom functions in character strings. The first two characters in the string store the number of key/value pairs and each subsequent block of 160 characters stores a key/value pair. Up to 99 key/value pairs can be passed into and returned
from the custom function. Within each record, the first 32 characters are reserved for the contact data key and the remaining 128 characters are reserved for the contact data value. Unused bytes within these key and value string fields must be padded with NULL values (binary zero).
For example, Figure B-1 shows the layout of the character string used to pass the following contact key/value pair into a custom function:
● Key: PIN, Value: 1234
Figure B-1Character string layout for contact data passed to a custom function The output string passed back to HPPC from the custom function would be formatted using the same rules. The number of key/value pairs passed within the input parameter and the output parameter may differ. Figure B-2 shows the layout of a character string used to return contact
data from a custom function. The contact data from Figure B-1 has been updated to include an address, possibly obtained by a database lookup.
● Key: PIN, Value: 1234
● Key: Address, Value: 2211 High Street
Figure B-2Character string layout for a contact data returned from a custom function
B.2 Runtime restrictions
When creating custom functions, you should account for the following runtime issues:
● Execution time restriction
● Exceptions
B.2.1 Execution time restriction
When called, the COM module or DLL function must finish execution within five seconds.
B.3 Sample DLL source code
The following is an example of the source code for a custom function called within a DLL.
CustomFunctionExampleDLL.cpp : Defines the entry point for the DLL application.
//
#include <stdlib.h>
#include "stdafx.h"
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
return TRUE;
}
extern "C"
{
__declspec(dllexport) long CustomFunctionExample(const char * dataIn, char *
dataOut)
{
// Determine number of input parameters
char numParametersAsString[3] = {dataIn[0], dataIn[1], '\0'};
const unsigned int numParameters = atoi(numParametersAsString);
const unsigned int HEADER_SIZE = 2;
const unsigned int KEY_SIZE = 32;
const unsigned int VALUE_SIZE = 128;
// Read each input parameter
for (unsigned int i = 0; i < numParameters; i++)
{
char key[KEY_SIZE] = {0};
char value[VALUE_SIZE] = {0};
const unsigned int keyIndex = HEADER_SIZE + numParameters * (KEY_SIZE
+ VALUE_SIZE);
const unsigned int valueIndex = keyIndex + KEY_SIZE;
memcpy(key, dataIn + keyIndex, sizeof(key));
memcpy(value, dataIn + valueIndex, sizeof(value));
}
// Return a single output parameter
dataOut[0] = '0';
dataOut[1] = '1';
char outputKey[KEY_SIZE] = {'O', 'U', 'T', '_', 'K', 'E', 'Y', '\0'};
char outputValue[VALUE_SIZE] = {'O', 'U', 'T', '_', 'V', 'A', 'L', 'U',
'E','\0'};
memcpy(dataOut + HEADER_SIZE, outputKey, sizeof(outputKey));
memcpy(dataOut + HEADER_SIZE + KEY_SIZE, outputValue,
sizeof(outputValue));
return 0;
}
}
B.4 Testing your custom function
After writing and compiling your custom function DLL or COM Module function, when
configuring the Custom Function component that calls your custom function, you can test
whether your function can be located and loaded properly. Clicking the Test button on the
General tab of a Custom Function component dialog box, will initiate loading of the function
specified in the Interface type, Function name, and Module location boxes. This test does
not execute the DLL or COM Module function.
GlenCope(my brain hurts)
|
|
|
|
|
GlenCope wrote: Using VB6 I can add a reference to my module and call the function OK.
Did you add a reference to it in .NET? I'm pretty sure you would have and my apologies if the question is condescending but I had to ask.
If I understand your problem correctly, you are compiling a class to expose to COM in order to share amongst assemblies but the COM component your creating isn't returning the results you were expecting?
|
|
|
|
|
Thanks for your reply. I contacted the vendor only to find out they require CLSID in order to call the component. My code was indeed correct all along. I do intend posting an article on this topic.
|
|
|
|
|
It'll be an interesting read.
|
|
|
|
|
Hello... is it possible to have justify alignment in a multiline textbox?
i want to make a movie database and i have a textbox that shows the plot and i'd like to have it with justify alignment. is any other way except using a textbox to present the plot?
thank you in advance
|
|
|
|
|
I don't believe a textbox supports this, no.
You should only use a textbox or rich textbox if you want the text to be editable. Otherwise, use a label.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Christian Graus wrote: You should only use a textbox or rich textbox if you want the text to be editable. Otherwise, use a label.
Yep. He's right.
|
|
|
|
|
but again label doesnt support wrap word with justify alignment... it is the same with textbox.. only difference it supports Trasparent...
|
|
|
|
|
Hi..
I have made a custom template that derives from ITemplate.
I have also create a class that inherits from INaming container.
For some reason i can not get the INaming container to work with my custom template. In order to implement the INaming container one must have a property that returns an ITemplate.
Why can i not return my custom Template the derives from ITemplate?
here is some of my code:
----
[ParseChildren(true)]
[PersistChildren(false)]
[ToolboxData("<{0}:HoverCalendar runat=server>")]
public class HoverCalendar : WebControl, INamingContainer
{
private ITemplate _itemTemplate;
[PersistenceMode(PersistenceMode.InnerProperty)]
public ITemplate ItemTemplate
{
get { return _itemTemplate; }
set { _itemTemplate = value; }
}
protected override void CreateChildControls()
{
Controls.Clear();
HtmlGenericControl container = new HtmlGenericControl("div");
if (ItemTemplate != null)
{ ItemTemplate.InstantiateIn(container); }
Controls.Add(container);
base.CreateChildControls();
}
}
*** this works fine; however, how do i use my ( the one below for example ) template?
----
public class myItemplate_1 : ITemplate
{
static int itemcount = 0;
ListItemType templateType;
public myItemplate_1(ListItemType type)
{
templateType = type;
}
public void InstantiateIn(System.Web.UI.Control container)
{
Literal lc = new Literal();
switch (templateType)
{
case ListItemType.Header:
lc.Text = "";
break;
case ListItemType.Item:
lc.Text = "";
break;
case ListItemType.AlternatingItem:
lc.Text = "";
break;
case ListItemType.Footer:
lc.Text = "Items |
---|
Item number: " + itemcount.ToString() +
" | Item number: " +
itemcount.ToString() + " | ";
break;
}
container.Controls.Add(lc);
itemcount += 1;
}
}
thanks
erik
|
|
|
|
|
Please read this[^], with specific reference to point 1.
Thanks.
|
|
|
|
|
Hello, may be you can help me with this problem. I want to extract the first frame of a quicktime movie. Is it posible to use the library to export the first frame of a quicktime movie using C#? Do you know some code in C# or vb.net or a COM dll to extract the first frame of a mov and save it as bmp or jpg without UI and command line.
Thanks a lot people !!!!
|
|
|
|
|
I am building an application witrh VB 6.0 wher I will be opening various excel workbooks. I was told to try and use the the "Send Keys.dll" feature whihc willl allow me to mimic the action a person takes to open an "excel program". Has anyone ever used this feature?
The day is long if you don't have help.
|
|
|
|
|
hi all
I have a big problem :
======================
1)- after i setup (windows 2003 server) and (the iis) and (VS.net 2003)
on my computer i found that problem .
2)- this problem i found it only when i use (ASP.net Web.App VB)
But the (Windows App work very good) when i change the
(Regional and language date formate to dd/mm/yyyy ).
* I can not made any change in ( Date formate MM/dd/yyyy ) from the
(Regional and language )this problem i found it only when i use
(ASP.net Web.App VB).
* I want to change the date format to (dd/mm/yyy) at my (WEB APP VB.NET).
* some one tell me i must format my hard and reinstall the windows and all
other app agin is this a solution !!!!!!!!!!! .
pls help my
thank you all
|
|
|
|
|
Please don't cross post.
---
That is not a problem with the installation. The regional settings in the control panel only affects your personal user account, not the account used to tun the ASP.NET code.
It would be a problem if the web site was affected by your personal preferences. Actually some earlier versions of IIS had this problem, which of course caused problems when web sites suddenly stopped working just because someone with a different regional setting logged in to the server.
Specify the regional settings for the web application; in web.config, global.asax, or in each page.
By the way, your use of parenthesis are quite confusing. Parenthesis are used to denote additional information that helps to clearify the main sentence.
And try to write a subject that means something the next time.
-- modified at 17:18 Monday 14th August, 2006
---
b { font-weight: normal; }
|
|
|
|
|
Hey all,
I'm having a hard time getting just part of an image to appear in a pic box.
Here's what I wanna do:
I have a picturebox that is 3200x2800 px. That has an image of a map in it. Then I put some more picture boxes over top of it in the shape of the countries on the map using the region property.
I then try this:
Dim bit As Bitmap = New Bitmap(map.Image)
Dim gmap As Graphics = Graphics.FromImage(bit)
gmap.Clip = New Region(mapPath) 'path of the country outline
picboxes(k).image = bit
I have also tried translating the graphics path, but nothing works. All it does is use the upper left corner of the map.image in every picturebox (which is really ugly ;-D ).
Any help is much appreciated,
Mike
Gaming at the GuildofBlades.com is the only way to really experiece the level 99 Soul-Sucking Sword!
|
|
|
|
|
Your core problem is Picture Box abuse. Get rid of them, and override the Paint event. Draw your own bitmaps. You get full control then.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Well, I can't get rid of the picture boxes cause they are the only way that I know how to do drag and drop. are you saying that it is not possible to do what I am asking about?
Thanks
Gaming at the GuildofBlades.com is the only way to really experiece the level 99 Soul-Sucking Sword!
|
|
|
|
|
i have been writing my own software by using windows controls such as command button and textbox. but sometime i wanted to create my own control perhaps a star-shaped command button, not just controls that were provided by vb, i have heard that this can be done by using windows GDI, can someone tell me where should i find info-beside msdn, like tutorial to better understand it.
Thankz before.
|
|
|
|
|
GDI is just the API for drawing. There are plenty of tutorials on this site. Are you using VB6 or VB.NET ? VB.NET uses GDI+, which is better
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|